<?php

namespace Packages\Sms\Providers;

use Packages\Sms\Services\SmsService;
use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{

    /**
     * 注册应用服务
     *
     * @return void
     */
    public function register()
    {

        $this->app->bind('smsService', SmsService::class);
    }

    /**
     * 启动应用服务
     *
     * @return void
     */
    public function boot()
    {
        // 添加路由
        $this->loadRoutesFrom(__DIR__ . '/../../routes/routes.php');

        // 添加数据库迁移
        // $this->loadMigrationsFrom(__DIR__ . '/path/to/migrations');

        // 注册扩展包的 Artisan 命令
        // if ($this->app->runningInConsole()) {
        //     $this->commands([
        //         FooCommand::class,
        //         BarCommand::class,
        //     ]);
        // }
    }
}
